LEX     = flex
YACC    = yacc
YFLAGS  = -d
LIBS    = -lJudy 

# CFLAGS	= -Wall -O2 
CFLAGS	= -ggdb -DNDEBUG -Wall -pg

# for 32 bit compilation
# CFLAGS	= -m32 -ggdb -DNDEBUG -Wall -pg 
# CFLAGS	= -m32 -Wall -O3
# LDLIBS	= -L/home/baris/Downloads/judy32/lib/ -lJudy

OBJECTS = parser/owl2fsParser.o parser/owl2fsLexer.o \
	model/model.o model/initialization.o model/utils.o model/print_utils.o model/memory_utils.o \
	index/index.o saturation/utils.o saturation/saturation.o hierarchy/hierarchy.o

all: cheetah
cheetah: model/model.h model/print_utils.h saturation/saturation.h $(OBJECTS) $(LIBS)

parser/owl2fsLexer.o: parser/owl2fsLexer.l model/model.h model/model.c
parser/owl2fsParser.o: parser/owl2fsParser.y parser/owl2fsParser.c model/model.h model/model.c model/limits.h

model/model.o: model/datatypes.h model/model.h model/utils.h
model/initialization.o: model/model.h
model/print_utils.o: model/datatypes.h model/model.h
model/utils.o: model/datatypes.h model/model.h model/limits.h
model/memory_utils.o: model/datatypes.h 

index/index.o: index/index.h model/datatypes.h

saturation/saturation.o: model/memory_utils.h saturation/utils.h saturation/locals.h saturation/context.h
saturation/utils.o: model/datatypes.h saturation/locals.h saturation/context.h

hierarchy/hierarchy.o: model/datatypes.h model/limits.h 

clean:
	rm -f cheetah $(OBJECTS)
